package edu.sctu.nieyu.day20150512.textone;

import edu.sctu.nieyu.day20150512.textone.Abstraction;

/**
 * Created by user01 on 2015/5/12.
 */
public class Call extends Abstraction {

    protected String name;
    protected int age;
    protected int weight;

    public Call(String name,int age,int weight){

        this.name = name ;
        this.age = age;
        this.weight = weight;

    }

    public void getName(){
        if (name.equals("老幺")){
            System.out.println("姓名："+name);
        }else {
            System.out.println("erro");
        }

    }

   public void getAge(){
       if(age < 25){
           System.out.println("年龄："+age);
       }else{
           System.out.println("无");
       }

   }

    public void getWeight(){
        if(weight <= 99){
            System.out.println("体重："+weight);
        }else {
            System.out.println("超重");
        }

    }
}
